package flex.cc.base.vo;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class PageInfo<T> implements Serializable {
    private static final long serialVersionUID = -2581495165185247663L;
    /**
     * The cur page.当前页
     */
    private int currentPage = 1;

    /**
     * The next page.下一页
     */
    private int nextPage;

    /**
     * The pre page. 上一页
     */
    private int prePage;

    /**
     * The total row. 总条数
     */
    private int totalRow;

    /**
     * The page size.每页条数
     */
    private int pageSize = 10;

    /**
     * The total page.总页数
     */
    private int totalPage;

    /**
     * The start. 开始条数
     */
    private int start;

    /**
     * The buttons.
     */
    private int[] buttons;

    /**
     * 当前页条数
     */
    private int curPageSize;

    private List<T> list;

    /**
     * Instantiates a new page util.
     */
    public PageInfo() {

    }

    /**
     * Instantiates a new page util.
     *
     * @param currentPage the current page
     */
    public PageInfo(int currentPage) {
        this.currentPage = currentPage;
    }

    /**
     * Instantiates a new page util.
     *
     * @param currentPage the current page
     * @param pageSize    the page size
     */
    public PageInfo(int currentPage, int pageSize) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
    }
}
